package com.ruoyi.fun.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.fun.domain.EcOrderItem;

/**
 * 订单商品Mapper接口
 * 
 * @author ruoyi
 * @date 2025-08-06
 */
public interface EcOrderItemMapper 
{
    /**
     * 查询订单商品
     * 
     * @param orderItemId 订单商品主键
     * @return 订单商品
     */
    public EcOrderItem selectEcOrderItemByOrderItemId(Long orderItemId);

    /**
     * 查询订单商品列表
     * 
     * @param ecOrderItem 订单商品
     * @return 订单商品集合
     */
    public List<EcOrderItem> selectEcOrderItemList(EcOrderItem ecOrderItem);

    /**
     * 新增订单商品
     * 
     * @param ecOrderItem 订单商品
     * @return 结果
     */
    public int insertEcOrderItem(EcOrderItem ecOrderItem);

    /**
     * 修改订单商品
     * 
     * @param ecOrderItem 订单商品
     * @return 结果
     */
    public int updateEcOrderItem(EcOrderItem ecOrderItem);

    /**
     * 删除订单商品
     * 
     * @param orderItemId 订单商品主键
     * @return 结果
     */
    public int deleteEcOrderItemByOrderItemId(Long orderItemId);

    /**
     * 批量删除订单商品
     * 
     * @param orderItemIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEcOrderItemByOrderItemIds(Long[] orderItemIds);

    /**
     * 根据订单商品ID和组织ID查询订单商品
     * 
     * @param orderItemId 订单商品主键
     * @param orgId 组织ID
     * @return 订单商品
     */
    public EcOrderItem selectEcOrderItemByOrderItemIdAndOrgId(@Param("orderItemId") Long orderItemId, @Param("orgId") Long orgId);

    /**
     * 根据组织ID查询订单商品列表
     * 
     * @param orgId 组织ID
     * @return 订单商品集合
     */
    public List<EcOrderItem> selectEcOrderItemListByOrgId(@Param("orgId") Long orgId);
}
